package com.smart.manager.wiki.entities.body;

import com.smart.common.entities.core.BaseSearch;
import com.smart.manager.wiki.entities.enums.NoticeScope;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;


/**
 * @author xiaxuqiu
 * @date 2023/03/26
 */
public class RDocEssay {

    @Data
    @EqualsAndHashCode(callSuper = true)
    @ApiModel("RDocEssay1")
    public static class SearchBody extends BaseSearch {


        @ApiModelProperty("文章名称")
        private String title;


    }


    @Data
    @ApiModel("RDocEssay2")
    public static class EditBody implements Serializable {


        @ApiModelProperty("用户群体")
        private NoticeScope scope ;


        @ApiModelProperty("文章标题")
        @Length(max = 30, message = "文章标题 不能超过30个字符")
        @NotBlank(message = " 文章标题  不能为空")
        private String title;

        @ApiModelProperty("文章摘要")
        @NotBlank(message = " 文章摘要  不能为空")
        @Length(max = 200, message = "文章标题 不能超过200个字符")
        private String digest;




        @ApiModelProperty("文章正文")
        @NotBlank(message = " 文章正文  不能为空")
        private String content;



    }


}
